package merchant.space;

import java.util.ArrayList;

public class Collections {

	private ArrayList<Collection> collections;
	private int selected;
	
	
	
	public int getSelected() {
		return selected;
	}

	



	public void setSelected(int selected) {
		this.selected = selected;
	}





	public Collections( ArrayList<Collection> c)
	{
		collections=c;
	}
	
	
	
	
	
	public ArrayList<Collection> getAll() { return collections; }
	// TESTE
	public Collections()
	{
	
		
		collections = new ArrayList<Collection>();
	}
	
	public Collection get(int pos) { return collections.get(pos); }
	
	public int size() { return collections.size(); }
	
//	public Collections clone() { return new Collections(this); }
	
	public void addCollection(Collection c)
	{
		collections.add(c);
	}
	
	
	public String[] getNames()
	{
		int i=0;
		String[] names = new String[collections.size()];
		for(Collection c : collections)
		{	
			names[i]=c.getName();// = new String(collections.size());
			i++;
		}
		//System.out.println("->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"+names[0]+","+names[1]);
		return names;
		
		
		
	}
	
	public String[] getDescriptions()
	{
		int i=0;
		String[] descriptions = new String[collections.size()];
		for(Collection c : collections)
		{	
			descriptions[i]=c.getDescription();// = new String(collections.size());
		}
		return descriptions;
	}
	
	public String[] getUsers()
	{
		int i=0;
		String[] users = new String[collections.size()];
		for(Collection c : collections)
		{	
			users[i]=c.getUser();// = new String(collections.size());
		}
		return users;
	}
	
	public int[] getVisibilitys()
	{
		int i=0;
		int[] vis = new int[collections.size()];
		for(Collection c : collections)
		{	
			vis[i]=c.getVisibility();// = new String(collections.size());
		}
		return vis;
	}
}
